#include "ObjectArea.h"
#include "Global.h"

namespace RisingStar
{

	CObjectArea::CObjectArea(TObjectProperty objPropert):CObject(objPropert)
	{		
		Init();
	}
	
	CObjectArea::CObjectArea()
	{
		Init();
	}
	
	CObjectArea::~CObjectArea()
	{

		
	}
	
	CObject::ObjectPtr CObjectArea::Copy()
	{
		//cout<<"CObjectArea Copy"<<endl;
		
		ObjectPtr pUser(new CObjectArea(mObjectProperty));
		*pUser = (*this);

		return pUser;
	}
	
	bool CObjectArea::Init()
	{
		nValues["对象类型"] = "区域";
		nValues["数据库类型"] = "区域";
		sGlobal.RequestCallbackMap["区域注册"] = CObjectArea::ObjectCallbackUserRegister;
		sGlobal.RequestCallbackMap["区域编辑"] = CObjectArea::ObjectCallbackUserEdit;
		sGlobal.RequestCallbackMap["区域删除"] = CObjectArea::ObjectCallbackUserDel;
		return true;
	}
	
	bool CObjectArea::ObjectCallbackUserRegister(CObject* obj)
	{
		cout<<"区域注册函数调用成功"<<endl;
		return true;
	}
	bool CObjectArea::ObjectCallbackUserEdit(CObject* obj)
	{
		//cout<<"区域修改函数调用成功"<<endl;
		ObjectCallbackSqlEdit(obj);
		return true;
	}
	
	bool CObjectArea::ObjectCallbackUserDel(CObject* obj)
	{
		ObjectCallbackSqlDel(obj);

		return true;
	}
	
	
	
	bool CObjectArea::ObjectCallbackUserPasswordResetAndLogin(CObject* obj)
	{
		
		ObjectCallbackSqlAddOrEdit(obj);
		
		
		
		cout<<"密码重置并登录"<<endl;
		return true;
	}
	
	bool CObjectArea::ObjectCallbackUserPasswordLogin(CObject* obj)
	{
		
		
		cout<<"密码登录"<<endl;
		return true;
	}
	
	bool CObjectArea::ObjectCallbackUserIdentifyingCodeSend(CObject* obj)
	{
		cout<<"区域验证码发送"<<endl;
		return true;
	}
	
	
	
}

